package com.jier.vo;

import com.jier.common.Result;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

/**
 * 分页结果集
 *
 * @author jie_r
 * @date 2018/1/5
 */
public class ResultVo<T> {
    /**
     * 数据集
     */
    @ApiModelProperty(value = "数据集", dataType = "List")
    private List<T> content;
    /**
     * 分页对象
     */
    @ApiModelProperty(value = "分页对象", dataType = "PageVo")
    private PageVo page;

    public ResultVo(Result<T> result) {
        this.content = result.getContent();
        this.page = new PageVo(result.getPage());
    }

    public List<T> getContent() {
        return content;
    }

    public void setContent(List<T> content) {
        this.content = content;
    }

    public PageVo getPage() {
        return page;
    }

    public void setPage(PageVo page) {
        this.page = page;
    }
}
